<?php

namespace BaseBundle\Entity;

use AdminBundle\Entity\Admin;
use Doctrine\ORM\Mapping as ORM;

/**
 * Article
 *
 * @ORM\Table(name="article")
 * @ORM\Entity(repositoryClass="BaseBundle\Repository\ArticleRepository")
 */
class Article
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var Admin
     * @ORM\OneToOne(targetEntity="AdminBundle\Entity\Admin")
     * @ORM\JoinColumn(name="admin_id", nullable=true, referencedColumnName="id")
     */
    private $admin;

    /**
     * @var ArticleClass
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\ArticleClass")
     * @ORM\JoinColumn(name="article_class_id", nullable=true, referencedColumnName="id")
     */
    private $ArticleClass;

    /**
     * @var Store
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\Store")
     * @ORM\JoinColumn(name="store_id", nullable=true, referencedColumnName="id")
     */
    private $store;

    /**
     * @var string
     * @ORM\Column(name="title", type="string", length=30, nullable=true, options={"comment":"文章标题"})
     */
    private $title;

    /**
     * @var string
     * @ORM\Column(name="content", type="text", nullable=true, options={"comment":"文章内容"})
     */
    private $content;

    /**
     * @var boolean
     * @ORM\Column(name="is_del", type="smallint", nullable=true, options={"comment":"是否删除","default":"0"})
     */
    private $isDel = 0;

    /**
     * @var boolean
     * @ORM\Column(name="is_recommend", type="smallint", nullable=true, options={"comment":"是否首页推荐","default":"0"})
     */
    private $isRecommend = 0;

    /**
     * @var string
     * @ORM\Column(name="show_image", type="text", nullable=true, options={"comment":"展示图"})
     */
    private $showImage;

    /**
     * @var integer
     *
     * @ORM\Column(name="view_times", type="integer", nullable=true, options={"comment":"查看次数", "default":"0"})
     */
    private $viewTimes = 0;

    /**
     * @var int
     * @ORM\Column(name="evaluate_times", type="smallint", nullable=true, options={"comment":"评价次数","default":"0"})
     */
    private $evaluateTimes = 0;

    /**
     * @var \DateTime
     * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"创建时间"} )
     */
    private $createdAt;

    /**
     * @var \DateTime
     * @ORM\Column(name="update_at", type="datetime", nullable=true, options={"comment":"修改时间"} )
     */
    private $updateAt;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     *
     * @return Article
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set content
     *
     * @param string $content
     *
     * @return Article
     */
    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }

    /**
     * Get content
     *
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set isDel
     *
     * @param integer $isDel
     *
     * @return Article
     */
    public function setIsDel($isDel)
    {
        $this->isDel = $isDel;

        return $this;
    }

    /**
     * Get isDel
     *
     * @return integer
     */
    public function getIsDel()
    {
        return $this->isDel;
    }

    /**
     * Set isRecommend
     *
     * @param integer $isRecommend
     *
     * @return Article
     */
    public function setIsRecommend($isRecommend)
    {
        $this->isRecommend = $isRecommend;

        return $this;
    }

    /**
     * Get isRecommend
     *
     * @return integer
     */
    public function getIsRecommend()
    {
        return $this->isRecommend;
    }

    /**
     * Set showImage
     *
     * @param string $showImage
     *
     * @return Article
     */
    public function setShowImage($showImage)
    {
        $this->showImage = $showImage;

        return $this;
    }

    /**
     * Get showImage
     *
     * @return string
     */
    public function getShowImage()
    {
        return $this->showImage;
    }

    /**
     * Set viewTimes
     *
     * @param integer $viewTimes
     *
     * @return Article
     */
    public function setViewTimes($viewTimes)
    {
        $this->viewTimes = $viewTimes;

        return $this;
    }

    /**
     * Get viewTimes
     *
     * @return integer
     */
    public function getViewTimes()
    {
        return $this->viewTimes;
    }

    /**
     * Set evaluateTimes
     *
     * @param integer $evaluateTimes
     *
     * @return Article
     */
    public function setEvaluateTimes($evaluateTimes)
    {
        $this->evaluateTimes = $evaluateTimes;

        return $this;
    }

    /**
     * Get evaluateTimes
     *
     * @return integer
     */
    public function getEvaluateTimes()
    {
        return $this->evaluateTimes;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     *
     * @return Article
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updateAt
     *
     * @param \DateTime $updateAt
     *
     * @return Article
     */
    public function setUpdateAt($updateAt)
    {
        $this->updateAt = $updateAt;

        return $this;
    }

    /**
     * Get updateAt
     *
     * @return \DateTime
     */
    public function getUpdateAt()
    {
        return $this->updateAt;
    }

    /**
     * Set admin
     *
     * @param \AdminBundle\Entity\Admin $admin
     *
     * @return Article
     */
    public function setAdmin(\AdminBundle\Entity\Admin $admin = null)
    {
        $this->admin = $admin;

        return $this;
    }

    /**
     * Get admin
     *
     * @return \AdminBundle\Entity\Admin
     */
    public function getAdmin()
    {
        return $this->admin;
    }

    /**
     * Set articleClass
     *
     * @param \BaseBundle\Entity\ArticleClass $articleClass
     *
     * @return Article
     */
    public function setArticleClass(\BaseBundle\Entity\ArticleClass $articleClass = null)
    {
        $this->ArticleClass = $articleClass;

        return $this;
    }

    /**
     * Get articleClass
     *
     * @return \BaseBundle\Entity\ArticleClass
     */
    public function getArticleClass()
    {
        return $this->ArticleClass;
    }

    /**
     * Set store
     *
     * @param \BaseBundle\Entity\Store $store
     *
     * @return Article
     */
    public function setStore(\BaseBundle\Entity\Store $store = null)
    {
        $this->store = $store;

        return $this;
    }

    /**
     * Get store
     *
     * @return \BaseBundle\Entity\Store
     */
    public function getStore()
    {
        return $this->store;
    }
}
